<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<title>我的公司</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui-win.css"/>
		<style>
            /*头部样式*/
            body{
              overflow-x:hidden;
            }
            #back{
                background: transparent;
            }
			#companyList{
				height:50px;
				line-height:50px;
				text-align:center;
			}
			#loginOut {
				bottom: 10px;
				height: 40px;
                margin-top: 10px;
			}
			a.btn, button.btn, input.btn {
				border: 1px solid #4390af;
				border-radius: 6px;
				background-color: #00abfd;
				padding: 10px 0;
				display: block;
				margin: 0 10px;
				font-size: 16px;
				color: #fff;
				text-align: center;
			}
            /*中间主体部分开始*/
            .hasMsg{ display:block;}
            .row{
                padding: 10px 1%;
                width: 98%;
                height: 100px;
                border-bottom: 1px solid #7e7e7e;
                /*background: red;*/
            }
            .row img{
                float: left;
                margin-right: 5px;
                width: 100px;
                height: 100px;
            }
            .innerContent{
                float: left;
                /*margin-left: -70px;*/
                /*width: auto;*/
                /*height: auto;*/
                width: 70%;
                height: 100px;
                /*background: green;*/
            }

            @media screen and (max-width: 374px) {
                .innerContent{width: 65%;}
            }
            .companyInfo{
                width: 100%;
                height: 3em;
                /*background: pink;*/
                overflow: hidden;
                margin-bottom: 3px;
                /*text-overflow: ellipsis;*/
                /*white-space: nowrap;*/
                font-size:0.8em;
            }

            .innerContent ul{list-style: none}
            .innerContent li{
                float: left;
                font-size:12px;
                line-height: 24px;
                margin-right: 10px;
            }
            .innerContent ul img{
                width: 24px;
                height: 24px;
            }
            /*中间主体部分结束*/
            .cld_li{    
                width: 100%;
                margin-top: 15px;
                height: 110px;
                background:white;
            }
            .cld_li a{
                float: left;
                width: 90%;
            }
            .cld_li img{
                float: left;
                height: 90px;
                margin-top: 10px;
                width: 90px;
                margin-left: 5px;
            }
            .cld_div1{
                height: 110px;
                margin-left: 110px;

            }
            .cld_div1 p{
                overflow:hidden;
                text-overflow:ellipsis;
                height:40px;
                width: 90%;
                color: #808080;
                font-size: 0.8rem;
                margin: 1px 0 1px 0;

            } 
            .cld_div1 h2{
                height: 25px;
                width: 100%;
                margin-top: 10px;
                font-weight: bold;
                color: #4c4c4c;
                font-size: 16px;
            }
            .cld_div2{
                height: 20px;
                width: 100%;
                color: #b3b3b3;
                font-size:0.8rem;
            }
            .cld_div2 span{
                display: block;
                height: 20px;
                float: left;
                background:url(../../image/my/good-serv.png) no-repeat;
                background-size: 18px 18px;
                line-height: 20px;
                padding-left: 18px;
            }
            #companyListDiv{
                width: 100%;
            }
            .delete_l{
                width: 10%;
                height: 20px;
                line-height: 45px;
                text-align: center;
                color: #999;
                float: right;
                font-size:12px;
               
            }
		</style>
	</head>
	<body>
    
   <header class="aui-bar aui-bar-nav aui-bar-yunzo" id="aui-header">
        <a class="aui-btn aui-bar-yunzo aui-pull-left" id="back" onclick="back_go()"> <span class="aui-iconfont aui-icon-left"></span></a>
        <div class="aui-title" id="title">
            我的公司
        </div>
        <a class="aui-iconfont aui-icon-menu aui-pull-right"></a>
    </header>
    <div class="margin_div"></div>
    <div id="content">
        <div id="companyListDiv"  class="noMsg">
            <!--<div class="row">-->
                <!--<img  src="../../image/my/company_dummy_logo .png" alt="logo"/>-->
                <!--<div class="innerContent">-->
                    <!--<label id="title">四川省商联装饰有限公司</label>-->
                    <!--<p class="companyInfo">广州市港中装饰设计有限公司是集装修设计、门禁与考勤系统、视屏会议为装饰设计有限公司是集</p>-->
                    <!--<ul>-->
                        <!--<li><img src="../../image/my/good-serv.png" alt="logo"/>优质服务</li>-->
                        <!--<li><img src="../../image/my/zhiliang.png" alt="logo"/>质量至上</li>-->
                    <!--</ul>-->
                <!--</div>-->
            <!--</div>-->
        </div>
		<div id="loginOut">
			<a class="btn" tapmode="active" onclick="addCompanyinfo();">添加公司</a>
		</div>
    </div>
    <!--加载loading功能-->
    <div id="loadIng_startStop" style="width: 100%;height: 100%;position: absolute;z-index: 1000;display: none;">
    	<div class="div_loding_img">
		数据加载中
		</div>
    </div>
    </body>

	<script type="text/javascript" src="../../script/jquery-1.10.2.min.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
    <script src="../../script/touch-0.2.14.min.js"></script>
    
    <script>
        /*获取个人公司列表*/
//        var baseDatas = basedata('myinfo');
        var pagesize=5;
        var bodyparam={
            mid:$mid,
            groupid:$groupid,
            did:initdata.get('mycompany'),
            pagesize:pagesize
        };

        /*loading加载转圈*/
        sTart_Stop();
         var str="";

        ajaxcocRequest("../../../api/group/getmembercompanylist","POST",bodyparam,function(msg){
            if(msg.code==100){
                if(msg.data.length==0){
                    
                    $("#companyListDiv").html("<div style='width:20%;margin:40px 0 0 40%;'><img src='../../image/gantan.png' style='width:100%;'></div><p style='width:100%;text-align:center;margin-top:30px;color:#999;font-size:18px;'>您还没有添加公司信息！</p>");
                }
                else{
                    var logoStr;
                    var sttr;
                    for(var i=0;i<msg.data.length;i++){
                      if(msg.data[i].n1==null){
                            logoStr= '../../image/home/busess/yunzo_def.png';
                        }
                        else{
                            logoStr=msg.data[i].n1;
                        }
                        if(msg.data[i].n11==""){
                            sttr="他（她）还没有添加公司介绍内容！"
                        }
                        else{
                            sttr=msg.data[i].n11;
                        }
                        str+='<li class="cld_li" id="' + msg.data[i].n0 + '"><a href="mycompany_info.html?infoid='+msg.data[i].n0+'"><img src="'+logoStr+'"><div class="cld_div1"><h2>'+msg.data[i].n2+'</h2><p>'+sttr+'</p><div class="cld_div2"><span>'+'优质服务'+'</span><span class="sp1">'+'质量之上'+'</span></div></div></a><div class="delete_l" onclick="delete_l(\'' + msg.data[i].n0 + '\')">'+'删除'+'</div></li>'; 
                        
                    }
                    $("#companyListDiv").html(str);
                }
            }
            else{
            	$("body").append('<div class="wuwang"><img src="../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
               
            }
        });
        /*返回上级页面*/
        function rec(){
            window.history.go(-1)
        }
        function addCompanyinfo(){
            window.location = "mycompany_add.html";
        }
        touch.on('.cld_li','swipeleft',function(ev){
            
        });
        function delete_l(mid){
            if(confirm( '确定是否真的删除信息?'))
			{
				var bodyparam1={
					mid:$mid,
					groupid:$groupid,
					did:initdata.get('mycompany'),
					comid:mid
				};
				ajaxcocRequest("../../../api/account/delmycompanyinfo","POST",bodyparam1,function(msg){
					if(msg.code==100){
						alert("删除成功！")
						$('#'+mid).css("display","none");
					}
					else{
						$("body").append('<div class="wuwang"><img src="../image/iconfont-wangluo.png"><p>网络拥堵，信息塞车</p></div>')
					}
					});
			}
        }
    </script>

</html>